home *** CD-ROM | disk | FTP | other *** search
/ CD-ROM Today - The Disc! 5 / CD-ROM Today - The Disc (Issue 5)(November 1994).ISO / mac / Mac shareware / Education / RLaB / rlib / isnan.r < prev    next >
Text File  |  1994-09-21  |  365b  |  16 lines

  1. //-------------------------------------------------------------------//
  2.  
  3. //  Syntax:    isnan ( X )
  4.  
  5. //  Description:
  6.  
  7. //  Isnan returns a matrix the same size as X containing zeros and
  8. //  ones. The ones locate the values in X that are NaNs.
  9.  
  10. //-------------------------------------------------------------------//
  11.  
  12. isnan = function ( X )
  13. {
  14.   return ! ( X == X );
  15. };
  16.